/*

This file is part of Rooms3D.

Copyright (C) 2008 Pixecur Technologies Incorporated (Esotera).
Visit Esotera at http://www.esoteras3.com
 
Rooms3D is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3, or (at your option)
any later version.
 
Rooms3D is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
General Public License for more details.
 
You should have received a copy of the GNU General Public License
along with Rooms3D; see the file COPYING.  If not, write to 
Pixecur Technologies, 213-31 Peet Street, St. John's, NL, A1B 3W8. 
 
Linking this library statically or dynamically with other modules is
making a combined work based on this library.  Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.
 
*/

package com.datasentinel.rooms.file.sh3d;

import java.io.File;

import com.eteks.sweethome3d.model.CatalogPieceOfFurniture;
import com.eteks.sweethome3d.model.Content;
import com.eteks.sweethome3d.model.PieceOfFurniture;

/**
 * @author rickp
 * 
 */
@SuppressWarnings("serial")
public class FilePieceOfFurniture extends CatalogPieceOfFurniture
{
	private File file;
	public FilePieceOfFurniture(File file, PieceOfFurniture template)
	{
		super("FilePieceOfFurniture", template.getIcon(), template.getModel(), template.getWidth(),
				template.getDepth(), template.getHeight(), template.getElevation(), template
						.isMovable(), template.isDoorOrWindow(), template.getColor(), template
						.getModelRotation(), template.isBackFaceShown(), 0, true);
	}
	/**
	 * @param file
	 * @param icon
	 * @param model
	 * @param width
	 * @param depth
	 * @param height
	 * @param movable
	 * @param doorOrWindow
	 */
	public FilePieceOfFurniture(File file, Content icon,
			Content model, float width, float depth, float height,
			boolean movable, boolean doorOrWindow)
	{
		super("FilePieceOfFurniture", icon, model, width, depth, height, movable, doorOrWindow);
		this.file = file;
	}

	/**
	 * @param file
	 * @param icon
	 * @param model
	 * @param width
	 * @param depth
	 * @param height
	 * @param elevation
	 * @param movable
	 * @param doorOrWindow
	 */
	public FilePieceOfFurniture(File file, Content icon,
			Content model, float width, float depth, float height,
			float elevation, boolean movable, boolean doorOrWindow)
	{
		super("FilePieceOfFurniture", icon, model, width, depth, height, elevation, movable,
				doorOrWindow);
		this.file = file;
	}

	/**
	 * @param file
	 * @param icon
	 * @param model
	 * @param width
	 * @param depth
	 * @param height
	 * @param elevation
	 * @param movable
	 * @param doorOrWindow
	 * @param modelRotation
	 * @param creator
	 */
	public FilePieceOfFurniture(File file, Content icon,
			Content model, float width, float depth, float height,
			float elevation, boolean movable, boolean doorOrWindow,
			float[][] modelRotation, String creator)
	{
		super("FilePieceOfFurniture", icon, model, width, depth, height, elevation, movable,
				doorOrWindow, modelRotation, creator);
		this.file = file;
	}

	/**
	 * @param file
	 * @param icon
	 * @param model
	 * @param width
	 * @param depth
	 * @param height
	 * @param elevation
	 * @param movable
	 * @param doorOrWindow
	 * @param color
	 * @param modelRotation
	 * @param backFaceShown
	 * @param iconYaw
	 * @param proportional
	 */
	public FilePieceOfFurniture(File file, Content icon,
			Content model, float width, float depth, float height,
			float elevation, boolean movable, boolean doorOrWindow,
			Integer color, float[][] modelRotation, boolean backFaceShown,
			float iconYaw, boolean proportional)
	{
		super("FilePieceOfFurniture", icon, model, width, depth, height, elevation, movable,
				doorOrWindow, color, modelRotation, backFaceShown, iconYaw,
				proportional);
		this.file = file;
	}


	public File getFile()
	{
		return file;
	}
	
	@Override
	public String getName()
	{
		return file.getName();
	}
}
